package hello.jpa.serviceImpl;

import hello.jpa.dao.UserDaoImpl;
import hello.jpa.service.UserDao;
import hello.jpa.service.UserService;
import hello.pojos.Users;

/**
 * Author hiberk
 * Date 2017/7/6 11:58
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao = new UserDaoImpl();

    @Override
    public Users createUser(Integer id, String userName, Integer age) {
        Users user = new Users();
//        user.setId(id);
        user.setUserName(userName);
        user.setAge(23);
        userDao.save(user);
        return user;
    }
}
